package cn.tedu.bonfire.admin.account.pojo.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class UserUpdateInfoParam implements Serializable {
    /*
     * 用户id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户头像
     */
    @ApiModelProperty(value = "头像", required = true)
    private String avatar;

    /*
     * 用户密码
     */
    @NotNull(message = "密码不能为空")
    @Pattern(regexp = "^.{4,15}$",
            message = "密码必须是4~15长度的字符组成")
    @ApiModelProperty(value = "密码", required = true, example = "123456")
    private String password;

    /*
     * 用户昵称
     */
    @Pattern(regexp = "^.{1,10}$", message = "昵称应为1-10位")
    @ApiModelProperty(value = "昵称", required = true)
    private String nickname;

    /*
     * 用户电话
     */
    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "^\\d{11}$",
            message = "手机号码必须是11位的纯数字")
    @ApiModelProperty(value = "手机号码", required = true, example = "13800138008")
    private String phone;



}
